package com.ruibang.glass.equipment.entity.device;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import com.teaming.cloud.framework2.common.tools.LocalDateTimeStringConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel(value = "隐患台账信息")
@TableName(value = "g_equipment_hazard_account")
public class HazardAccount extends BaseEntity implements Serializable {
    @ApiModelProperty(value = "隐患Id")
    @TableId(value = "hazard_id", type = IdType.ASSIGN_ID)
    @ExcelIgnore
    private String hazardId;
    @ApiModelProperty(value = "区域")
    @ExcelIgnore
    private String areaId;
    @ApiModelProperty(value = "区域名称")
    @ExcelProperty(value = {"区域Id"}, index = 1)
    private String areaName;
    @ApiModelProperty(value = "设备Id")
    @ExcelIgnore
    private String deviceId;
    @ApiModelProperty(value = "设备名称")
    @ExcelProperty(value = {"设备名称"}, index = 2)
    private String deviceName;
    @ApiModelProperty(value = "问题描述")
    @ExcelProperty(value = {"问题描述"}, index = 3)
    private String problemDescription;
    @ApiModelProperty(value = "上报人名称")
    @ExcelProperty(value = {"上报人"}, index = 4)
    @TableField(exist = false)
    private String reporterName;
    @ApiModelProperty(value = "上报人")
    @ExcelIgnore
    private String reporterId;
    @ApiModelProperty(value = "整改小组")
    @ExcelProperty(value = {"整改小组"}, index = 5)
    private String hazardGroup;
    @ApiModelProperty(value = "整改小组")
    @ExcelIgnore
    private String hazardGroupId;
    @ApiModelProperty(value = "整改人")
    @ExcelProperty(value = {"整改人"}, index = 6)
    @TableField(exist = false)
    private String rectifierName;
    @ApiModelProperty(value = "整改人")
    @ExcelIgnore
    private String rectifierId;
    @ApiModelProperty(value = "上报时间")
    @ExcelProperty(value = {"上报时间"}, index = 7, converter = LocalDateTimeStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reportTime;
    @ApiModelProperty(value = "隐患状态")
    @ExcelProperty(value = {"隐患状态"}, index = 8)
    private String hazardStatus;
    @ApiModelProperty(value = "预计完成时间")
    @ExcelProperty(value = {"预计完成时间"}, index = 9, converter = LocalDateTimeStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime estimatedCompletionTime;
    @ApiModelProperty(value = "隐患等级")
    @ExcelProperty(value = {"隐患等级"}, index = 10)
    private String hazardLevel;
    @ApiModelProperty(value = "整改措施")
    @ExcelProperty(value = {"整改措施"}, index = 11)
    private String rectificationMeasures;
    @ExcelProperty(value = {"备注"}, index = 12)
    @ApiModelProperty(value = "备注")
    private String notes;

    @ApiModelProperty(value = "隐患归档")
    @ExcelIgnore
    private String hazardType;

    @ExcelIgnore
    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ExcelIgnore
    @TableField(exist = false)
    private List<String> removeIdList;
    @ExcelIgnore
    @TableField(exist = false)
    @ApiModelProperty(value = "隐患照片")
    private List<String> fileIds;
    @ExcelIgnore
    @TableField(exist = false)
    private String menuId;
    @ExcelIgnore
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "是否删除(1：是 0：否)")
    @ExcelIgnore
    @TableLogic
    private String isDelete;

    @ExcelIgnore
    @TableField(exist = false)
    private String currentUser;

    @TableField(exist = false)
    private String nodeName;
}
